\(\int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx\) [465]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F(-1)]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 115 \[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=-\frac {2 b}{5 f (b \sec (e+f x))^{3/2} \sin ^{\frac {5}{2}}(e+f x)}-\frac {4 b}{5 f (b \sec (e+f x))^{3/2} \sqrt {\sin (e+f x)}}-\frac {4 E\left (\left .e-\frac {\pi }{4}+f x\right |2\right ) \sqrt {\sin (e+f x)}}{5 f \sqrt {b \sec (e+f x)} \sqrt {\sin (2 e+2 f x)}} \]

[Out]

-2/5*b/f/(b*sec(f*x+e))^(3/2)/sin(f*x+e)^(5/2)-4/5*b/f/(b*sec(f*x+e))^(3/2)/sin(f*x+e)^(1/2)+4/5*(sin(e+1/4*Pi
+f*x)^2)^(1/2)/sin(e+1/4*Pi+f*x)*EllipticE(cos(e+1/4*Pi+f*x),2^(1/2))*sin(f*x+e)^(1/2)/f/(b*sec(f*x+e))^(1/2)/
sin(2*f*x+2*e)^(1/2)

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2664, 2665, 2652, 2719} \[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=-\frac {2 b}{5 f \sin ^{\frac {5}{2}}(e+f x) (b \sec (e+f x))^{3/2}}-\frac {4 b}{5 f \sqrt {\sin (e+f x)} (b \sec (e+f x))^{3/2}}-\frac {4 \sqrt {\sin (e+f x)} E\left (\left .e+f x-\frac {\pi }{4}\right |2\right )}{5 f \sqrt {\sin (2 e+2 f x)} \sqrt {b \sec (e+f x)}} \]

[In]

Int[1/(Sqrt[b*Sec[e + f*x]]*Sin[e + f*x]^(7/2)),x]

[Out]

(-2*b)/(5*f*(b*Sec[e + f*x])^(3/2)*Sin[e + f*x]^(5/2)) - (4*b)/(5*f*(b*Sec[e + f*x])^(3/2)*Sqrt[Sin[e + f*x]])
 - (4*EllipticE[e - Pi/4 + f*x, 2]*Sqrt[Sin[e + f*x]])/(5*f*Sqrt[b*Sec[e + f*x]]*Sqrt[Sin[2*e + 2*f*x]])

Rule 2652

Int[Sqrt[cos[(e_.) + (f_.)*(x_)]*(b_.)]*Sqrt[(a_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[Sqrt[a*Sin[e +
f*x]]*(Sqrt[b*Cos[e + f*x]]/Sqrt[Sin[2*e + 2*f*x]]), Int[Sqrt[Sin[2*e + 2*f*x]], x], x] /; FreeQ[{a, b, e, f},
 x]

Rule 2664

Int[((b_.)*sec[(e_.) + (f_.)*(x_)])^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b*(a*Sin[e +
f*x])^(m + 1)*((b*Sec[e + f*x])^(n - 1)/(a*f*(m + 1))), x] + Dist[(m - n + 2)/(a^2*(m + 1)), Int[(a*Sin[e + f*
x])^(m + 2)*(b*Sec[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f, n}, x] && LtQ[m, -1] && IntegersQ[2*m, 2*n]

Rule 2665

Int[((b_.)*sec[(e_.) + (f_.)*(x_)])^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[(b*Cos[e + f*
x])^n*(b*Sec[e + f*x])^n, Int[(a*Sin[e + f*x])^m/(b*Cos[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f, m, n}, x] &&
 IntegerQ[m - 1/2] && IntegerQ[n - 1/2]

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 b}{5 f (b \sec (e+f x))^{3/2} \sin ^{\frac {5}{2}}(e+f x)}+\frac {2}{5} \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {3}{2}}(e+f x)} \, dx \\ & = -\frac {2 b}{5 f (b \sec (e+f x))^{3/2} \sin ^{\frac {5}{2}}(e+f x)}-\frac {4 b}{5 f (b \sec (e+f x))^{3/2} \sqrt {\sin (e+f x)}}-\frac {4}{5} \int \frac {\sqrt {\sin (e+f x)}}{\sqrt {b \sec (e+f x)}} \, dx \\ & = -\frac {2 b}{5 f (b \sec (e+f x))^{3/2} \sin ^{\frac {5}{2}}(e+f x)}-\frac {4 b}{5 f (b \sec (e+f x))^{3/2} \sqrt {\sin (e+f x)}}-\frac {4 \int \sqrt {b \cos (e+f x)} \sqrt {\sin (e+f x)} \, dx}{5 \sqrt {b \cos (e+f x)} \sqrt {b \sec (e+f x)}} \\ & = -\frac {2 b}{5 f (b \sec (e+f x))^{3/2} \sin ^{\frac {5}{2}}(e+f x)}-\frac {4 b}{5 f (b \sec (e+f x))^{3/2} \sqrt {\sin (e+f x)}}-\frac {\left (4 \sqrt {\sin (e+f x)}\right ) \int \sqrt {\sin (2 e+2 f x)} \, dx}{5 \sqrt {b \sec (e+f x)} \sqrt {\sin (2 e+2 f x)}} \\ & = -\frac {2 b}{5 f (b \sec (e+f x))^{3/2} \sin ^{\frac {5}{2}}(e+f x)}-\frac {4 b}{5 f (b \sec (e+f x))^{3/2} \sqrt {\sin (e+f x)}}-\frac {4 E\left (\left .e-\frac {\pi }{4}+f x\right |2\right ) \sqrt {\sin (e+f x)}}{5 f \sqrt {b \sec (e+f x)} \sqrt {\sin (2 e+2 f x)}} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 0.54 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.71 \[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=\frac {2 b \left (-2+\cos (2 (e+f x))+2 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {1}{4},\frac {1}{2},\sec ^2(e+f x)\right ) \sin ^2(e+f x) \sqrt [4]{-\tan ^2(e+f x)}\right )}{5 f (b \sec (e+f x))^{3/2} \sin ^{\frac {5}{2}}(e+f x)} \]

[In]

Integrate[1/(Sqrt[b*Sec[e + f*x]]*Sin[e + f*x]^(7/2)),x]

[Out]

(2*b*(-2 + Cos[2*(e + f*x)] + 2*Hypergeometric2F1[-1/2, 1/4, 1/2, Sec[e + f*x]^2]*Sin[e + f*x]^2*(-Tan[e + f*x
]^2)^(1/4)))/(5*f*(b*Sec[e + f*x])^(3/2)*Sin[e + f*x]^(5/2))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(440\) vs. \(2(120)=240\).

Time = 0.89 (sec) , antiderivative size = 441, normalized size of antiderivative = 3.83

method result size
default \(-\frac {\sqrt {2}\, \left (1-\cos \left (f x +e \right )\right ) \left (16 \sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {2+2 \cot \left (f x +e \right )-2 \csc \left (f x +e \right )}\, \sqrt {\cot \left (f x +e \right )-\csc \left (f x +e \right )}\, E\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) \left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-8 \sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {2+2 \cot \left (f x +e \right )-2 \csc \left (f x +e \right )}\, \sqrt {\cot \left (f x +e \right )-\csc \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) \left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-\left (1-\cos \left (f x +e \right )\right )^{6} \left (\csc ^{6}\left (f x +e \right )\right )+9 \left (1-\cos \left (f x +e \right )\right )^{4} \left (\csc ^{4}\left (f x +e \right )\right )-7 \left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-1\right ) \csc \left (f x +e \right )}{20 f \left (\frac {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}{\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1}\right )^{\frac {7}{2}} \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1\right )^{3} \sqrt {-\frac {b \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1\right )}{\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-1}}\, \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-1\right )}\) \(441\)

[In]

int(1/sin(f*x+e)^(7/2)/(b*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/20/f*2^(1/2)/(1/((1-cos(f*x+e))^2*csc(f*x+e)^2+1)*(-cot(f*x+e)+csc(f*x+e)))^(7/2)*(1-cos(f*x+e))/((1-cos(f*
x+e))^2*csc(f*x+e)^2+1)^3*(16*(-cot(f*x+e)+csc(f*x+e)+1)^(1/2)*(2+2*cot(f*x+e)-2*csc(f*x+e))^(1/2)*(cot(f*x+e)
-csc(f*x+e))^(1/2)*EllipticE((-cot(f*x+e)+csc(f*x+e)+1)^(1/2),1/2*2^(1/2))*(1-cos(f*x+e))^2*csc(f*x+e)^2-8*(-c
ot(f*x+e)+csc(f*x+e)+1)^(1/2)*(2+2*cot(f*x+e)-2*csc(f*x+e))^(1/2)*(cot(f*x+e)-csc(f*x+e))^(1/2)*EllipticF((-co
t(f*x+e)+csc(f*x+e)+1)^(1/2),1/2*2^(1/2))*(1-cos(f*x+e))^2*csc(f*x+e)^2-(1-cos(f*x+e))^6*csc(f*x+e)^6+9*(1-cos
(f*x+e))^4*csc(f*x+e)^4-7*(1-cos(f*x+e))^2*csc(f*x+e)^2-1)/(-b*((1-cos(f*x+e))^2*csc(f*x+e)^2+1)/((1-cos(f*x+e
))^2*csc(f*x+e)^2-1))^(1/2)/((1-cos(f*x+e))^2*csc(f*x+e)^2-1)*csc(f*x+e)

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.13 (sec) , antiderivative size = 239, normalized size of antiderivative = 2.08 \[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=-\frac {2 \, {\left ({\left (i \, \cos \left (f x + e\right )^{2} - i\right )} \sqrt {i \, b} E(\arcsin \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )\,|\,-1) \sin \left (f x + e\right ) + {\left (-i \, \cos \left (f x + e\right )^{2} + i\right )} \sqrt {-i \, b} E(\arcsin \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )\,|\,-1) \sin \left (f x + e\right ) + {\left (-i \, \cos \left (f x + e\right )^{2} + i\right )} \sqrt {i \, b} F(\arcsin \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )\,|\,-1) \sin \left (f x + e\right ) + {\left (i \, \cos \left (f x + e\right )^{2} - i\right )} \sqrt {-i \, b} F(\arcsin \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )\,|\,-1) \sin \left (f x + e\right ) + {\left (2 \, \cos \left (f x + e\right )^{4} - 3 \, \cos \left (f x + e\right )^{2}\right )} \sqrt {\frac {b}{\cos \left (f x + e\right )}} \sqrt {\sin \left (f x + e\right )}\right )}}{5 \, {\left (b f \cos \left (f x + e\right )^{2} - b f\right )} \sin \left (f x + e\right )} \]

[In]

integrate(1/sin(f*x+e)^(7/2)/(b*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

-2/5*((I*cos(f*x + e)^2 - I)*sqrt(I*b)*elliptic_e(arcsin(cos(f*x + e) + I*sin(f*x + e)), -1)*sin(f*x + e) + (-
I*cos(f*x + e)^2 + I)*sqrt(-I*b)*elliptic_e(arcsin(cos(f*x + e) - I*sin(f*x + e)), -1)*sin(f*x + e) + (-I*cos(
f*x + e)^2 + I)*sqrt(I*b)*elliptic_f(arcsin(cos(f*x + e) + I*sin(f*x + e)), -1)*sin(f*x + e) + (I*cos(f*x + e)
^2 - I)*sqrt(-I*b)*elliptic_f(arcsin(cos(f*x + e) - I*sin(f*x + e)), -1)*sin(f*x + e) + (2*cos(f*x + e)^4 - 3*
cos(f*x + e)^2)*sqrt(b/cos(f*x + e))*sqrt(sin(f*x + e)))/((b*f*cos(f*x + e)^2 - b*f)*sin(f*x + e))

Sympy [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=\text {Timed out} \]

[In]

integrate(1/sin(f*x+e)**(7/2)/(b*sec(f*x+e))**(1/2),x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=\int { \frac {1}{\sqrt {b \sec \left (f x + e\right )} \sin \left (f x + e\right )^{\frac {7}{2}}} \,d x } \]

[In]

integrate(1/sin(f*x+e)^(7/2)/(b*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(sqrt(b*sec(f*x + e))*sin(f*x + e)^(7/2)), x)

Giac [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=\text {Timed out} \]

[In]

integrate(1/sin(f*x+e)^(7/2)/(b*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Timed out

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {b \sec (e+f x)} \sin ^{\frac {7}{2}}(e+f x)} \, dx=\int \frac {1}{{\sin \left (e+f\,x\right )}^{7/2}\,\sqrt {\frac {b}{\cos \left (e+f\,x\right )}}} \,d x \]

[In]

int(1/(sin(e + f*x)^(7/2)*(b/cos(e + f*x))^(1/2)),x)

[Out]

int(1/(sin(e + f*x)^(7/2)*(b/cos(e + f*x))^(1/2)), x)